home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="ISO-8859-1"?>
- <!DOCTYPE html PUBLIC "+//ISBN 0-9673008-1-9//DTD OEB 1.2 Document//EN" "http://openebook.org/dtds/oeb-1.2/oebdoc12.dtd">
- <html xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
- <meta http-equiv="pragma" content="no-cache" />
- <title>WebWrights Contents Manager</title>
- <base target="main" />
- <script type="text/javascript" language="javascript"><!--
-
- var ControlVersion = '2.0.1.6';
- var fonts = new Array( 'Lucida Bright,Bookman Old Style,Georgia,Times New Roman,serif', //SerifFonts
- 'Lucida Sans,Verdana,Arial,Helvetica,sans-serif', //Sans Serif Fonts
- 'Lucida Console,Courier New,Courier,monospace'); // Monospace Fonts
- var fnt = '';
- var fntIndex = 0;
-
- var fntSize = 'medium';
- var fntSizeIndex = 3;
-
- var mainBgColor = '#fffcf8';
-
- var FirstChap = '';
- var BlurbPage = '';
-
- if (parent.innerWidth)
- {
- var origWidth = window.innerWidth;
- var origHeight = window.innerHeight;
- }
-
- function getCookieVal (offset) {
- var endstr = document.cookie.indexOf (";", offset);
- if (endstr == -1)
- endstr = document.cookie.length;
- return unescape(document.cookie.substring(offset, endstr));
- }
-
- function FixCookieDate (date) {
- var base = new Date(0);
- var skew = base.getTime(); // dawn of (Unix) time - should be 0
- if (skew > 0) // Except on the Mac - ahead of its time
- date.setTime (date.getTime() - skew);
- }
-
- function GetCookie (name) {
- var arg = name + "=";
- var alen = arg.length;
- var clen = document.cookie.length;
- var i = 0;
- while (i < clen) {
- var j = i + alen;
- if (document.cookie.substring(i, j) == arg)
- return getCookieVal (j);
- i = document.cookie.indexOf(" ", i) + 1;
- if (i == 0) break;
- }
- return null;
- }
-
- function SetCookie (name,value,expires,path,domain,secure) {
- document.cookie = name + "=" + escape (value) +
- ((expires) ? "; expires=" + expires.toGMTString() : "") +
- ((path) ? "; path=" + path : "") +
- ((domain) ? "; domain=" + domain : "") +
- ((secure) ? "; secure" : "");
- }
-
- function DeleteCookie (name,path,domain) {
- if (GetCookie(name)) {
- document.cookie = name + "=" +
- ((path) ? "; path=" + path : "") +
- ((domain) ? "; domain=" + domain : "") +
- "; expires=Thu, 01-Jan-70 00:00:01 GMT";
- }
- }
-
- function expdate()
- {
- var edate = new Date ();
- FixCookieDate (edate); // Correct for Mac date bug - call only once for given Date object!
- edate.setTime (edate.getTime() + (240 * 60 * 60 * 1000)); // 240 hrs from now
- return edate;
- }
-
- function isData()
- {
- return(parent != null); // Is the data module loaded
- }
-
- function isbn()
- {
- if (isData()) return(parent.isbn);
- }
-
- function lastPg()
- {
- if (isData()) return(parent.lastPg)
- else return("");
- }
-
- function TheBookTitle()
- {
- if (isData()) return(parent.TheBookTitle);
- }
-
- function GetFonts(aIndex)
- {
- fntIndex = aIndex;
- return(fonts[aIndex]);
- }
-
- function font()
- {
- return(fnt);
- }
-
- function SetFont( aIndex)
- {
- if (aIndex == null) aIndex=0;
-
- fnt = GetFonts(aIndex);
- SetCookie('eWSFontIndex', aIndex, expdate());
-
- if (document.PageSelect.FontList != null)
- document.PageSelect.FontList.selectedIndex = fntIndex;
-
- if (parent.main)
- {
- if (parent.document.tags)
- {
- parent.main.document.location.reload(false);
- }
- else
- {
- mainLoad(parent.main.document);
- }
- }
- }
-
- function fontSize()
- {
- return(fntSize);
- }
-
- function SetFontSize( aIndex)
- {
- if (aIndex == null) aIndex=3;
-
- fntSizeIndex = aIndex;
- if (document.PageSelect.fSize != null)
- {
- fntSize = document.PageSelect.fSize.options[aIndex].text;
-
- SetCookie('eWSFontSizeIndex', aIndex, expdate());
-
- document.PageSelect.fSize.selectedIndex = fntSizeIndex;
- }
- if (parent.main)
- {
- if (parent.document.tags)
- {
- parent.main.document.location.reload(false);
- }
- else
- {
- mainLoad(parent.main.document);
- }
- }
- }
-
- function GetBookTitle()
- {
- return TheBookTitle();
- }
-
- function SetBookTitle(aTitle)
- {
- if (isData()) parent.TheBookTitle = aTitle;
- }
-
- function restorePage()
- {
- if (parent.innerWidth)
- if (origWidth != window.innerWidth || origHeight != window.innerHeight)
- {
- history.go(0);
- }
- }
-
- function mainLoad(aDoc)
- {
- {
- if (aDoc.body && aDoc.body.style)
- {
- aDoc.body.style.fontSize = fontSize();
- aDoc.body.style.fontFamily = font();
- if (aDoc.setStyle) aDoc.setStyle();
- }
- else
- if (parent.document.tags)
- {
- aDoc.tags.P.textIndent = "2em";
- aDoc.tags.P.marginTop = "0";
- aDoc.tags.P.marginBottom = "2px";
- aDoc.tags.BODY.fontSize = fontSize();
- aDoc.tags.BODY.fontFamily = font();
- aDoc.tags.TD.fontSize = fontSize();
- aDoc.tags.TD.fontFamily = font();
- }
- }
- aDoc.bgColor=mainBgColor;
-
- var aStr = '<html><head><title></title></head>';
- aStr += '<body bgcolor="#000080" text="#FFFF00" style="font-family:Arial">';
- aStr += '<h5> ' + GetBookTitle() + ' ' + aDoc.title + '</h5>';
- aStr += '</body></html>';
-
- B = parent.banner.document;
- B.close();
- B.open('text/html','replace');
- B.write(aStr);
- B.close();
- }
-
- function SetPage(PgNo)
- {
- if (parent.document.tags) return;
- if (PgNo == null)
- {
- if (parent.main) parent.main.location.replace(FirstChap);
- }
- else
- {
- PgNo = parseInt(PgNo);
- if (PgNo != PgNo) return;
-
- document.PageSelect.PageNo.value = PgNo;
- var ChapNo = '';
- if ((PgNo < 0) || (PgNo > lastPg()[lastPg().length - 1]))
- {
- document.PageSelect.PageNo.value = lastPg()[lastPg().length - 1];
- alert('Page Number is out of range for this book.'
- +' Please Enter a Page number between 0 and ' + document.PageSelect.PageNo.value);
- return(false);
- }
- for (i=0; i < lastPg().length; i++)
- {
- if (!(i==0 && lastPg()[0]==0))
- {
- if ((PgNo > lastPg()[i-1]) && (PgNo <= lastPg()[i]) || ((PgNo >=0) && (PgNo <= lastPg()[0])))
- {
- if (parent.main != null)
- {
- var str = ChapterFileName(i) + '#p' + PgNo;
- parent.main.location.replace(str);
- break;
- }
- }
- }
- }
- }
- return(false);
- }
-
- function PageSelect_onsubmit()
- {
- SetPageCookie();
- return SetPage(document.PageSelect.PageNo.value);
- }
-
- function FontList_onchange()
- {
- var nItem = document.PageSelect.FontList.selectedIndex;
- SetFont(nItem);
- }
-
- function fSize_onchange()
- {
- var CookieFntSize = null;
-
- nItem = document.PageSelect.fSize.selectedIndex;
-
- SetFontSize(nItem);
- }
-
- function SetPageCookie()
- {
- if (document.PageSelect.PageNo == null) return;
- var aIndex = parseInt(document.PageSelect.PageNo.value);
- if (isNaN(aIndex)) return;
- SetCookie('eWS' + isbn() + 'PageNo', aIndex, expdate());
- }
-
- function ChapterFileName( nChapter )
- {
- ChapNo = '_' + nChapter;
- while (ChapNo.length < 4)
- {
- ChapNo = '_' + ChapNo;
- }
- return isbn() + ChapNo + '.htm';
- }
-
- function MakeIndex()
- {
- if (!parent.document.tags)
- {
- var s = '<tr><th colspan="5">';
- s +='<a href="" onclick="return PageSelect_onsubmit()">Bookmark</a><br>';
- s +='<input type="text" name="PageNo" size="4" value="1" ';
- s +='onblur="PageSelect_onsubmit();"';
- s +='></th></tr>\n';
- document.write(s);
- }
- }
-
- function MakeChapTable()
- {
- var tbl = '';
- var sOut = '<tr><th colspan="5" align="center">Chapters</th></tr><tr>\n';
- var prologue = 1;
-
- if (! isData()) return("");
-
- if (lastPg()[0] == 0)
- {
- prologue = 1;
- }
- else
- {
- prologue = 0;
- }
-
- for (i=prologue; i < lastPg().length; i++)
- {
- tbl = '';
-
- if (FirstChap=='')
- FirstChap = ChapterFileName(i);
-
- tbl += '<td valign="top" align="center"><b>';
- tbl += '<a href="';
- tbl += ChapterFileName(i);
- tbl += '" target="main">';
- if (i == 0)
- {
- tbl += 'P';
- }
- else
- {
- tbl += i;
- }
-
- tbl += '</a></b></td>';
-
- if ( ( (i-(prologue-1)) % 5) == 0 )
- {
- tbl +='</tr><tr>';
- }
- sOut += tbl;
- }
- while (((i-(1*prologue)) % 5) != 0)
- {
- sOut += '<td> </td>';
- i++;
- }
- sOut += '</tr>';
-
- window.document.writeln(sOut);
- }
-
- function MakeCopyright()
- {
- if (lastPg()[0] == 0)
- prologue = 1;
- else
- prologue = 0;
-
- BlurbPage = isbn() + '__c_.htm';
- var s = '<tr><th colspan="5">\n';
- s += '<p>\n<a href="'+ BlurbPage + '">Cover</a></p>\n';
- s += '</td></tr>\n';
- s += '<tr><td colspan="5" align="center">\n';
- s += '<p><a href="' + isbn() + '___'+ prologue + '.htm" target="_top"><b>Frameless</b></a></p>\n';
- s += '</td></tr>\n';
-
- document.write(s);
- }
-
- function MakeFSize()
- {
- if ( parent.document.tags || parent.document.body.style)
- {
- var i = 8;
- var s = '<tr><td colspan="5" valign="top" align="center">\n';
- s +='<select size="1" name="fSize" ';
- s += 'width="90" ';
- s +='language="javascript" onchange="return fSize_onchange()">';
- s +='<option>xx-small\n';
- s +='<option>x-small\n';
- s +='<option>small\n';
- s +='<option>medium\n';
- s +='<option>large\n';
- s +='<option>x-large\n';
- s +='<option>xx-large\n';
- while (i < 65)
- {
- s += '<option>'+ i + 'pt\n';
-
- i++;
-
- if (i < 12) {i++;}
-
- if ((20 < i) && (i < 24)) {i++;}
-
- if ((24 < i) && (i < 64)) {i = i+7;}
- }
-
- s +='</select>\n';
- s +='</td></tr>\n';
- document.write(s);
- }
- }
-
- function MakeFontList()
- {
- if ( parent.document.tags || parent.document.body.style)
- {
- var s = '<tr><td colspan="5" valign="top" align="center">\n';
- s += '<select size="1" name="FontList" ';
- s += 'width="90" ';
- s += 'language="javascript" onchange="return FontList_onchange()">';
- s += '<option selected value="serif">serif</option>';
- s += '<option value="sans-serif">sans-serif</option>';
- s += '<option value="monospace">monospace</option>';
- s += '</select>\n';
- s += '</td></tr>';
- document.write(s);
- }
- }
-
- function MakeRotator()
- {
- var s = '<a href="http://www.webscription.net/ad/ebook_ad.aspx?isbn=';
- s += parent.isbn;
- s += '&title=';
- s += TheBookTitle();
- s += '"><img name="rotator" src="http://www.webscription.net/ad/ebook_banner.aspx?isbn='
- s += parent.isbn;
- s += '&title=';
- s += escape(TheBookTitle());
- s += '" border="0" vspace="5" onerror="this.style.display='
- s += "'none'";
- s += ';"></a>';
- document.write(s);
- }
-
- function Loaded()
- {
- if (parent.main)
- {
- if (isData())
- {
- SetFont(GetCookie('eWSFontIndex'));
- SetFontSize(GetCookie( 'eWSFontSizeIndex'));
- }
- }
-
- var search = parent.document.location.search;
- if (search == '?blurb')
- {
- parent.main.location.replace(BlurbPage);
- }
- else
- {
- SetPage(GetCookie( 'eWS' + isbn() + 'PageNo'));
- }
- }
-
- window.onresize=restorePage;
- window.onload = SetPageCookie;
-
- //--></script>
-
- <style type="text/css">
- body,p,td,th,input,select {font-family:Arial,Helvetica,sans-serif;}
- input,select {width:75px;font-size:11px;padding:0;text-align:center}
- td,input,select {font-size:11px;}
- th {font-size:15px}
- </style>
- </head>
- <body style="background-color:#000080;color:#FFFFFF;" link="#00FFFF" vlink="#FFFFFF" alink="#FF0000" onload="Loaded()" onresize="restorePage()" onunload="SetPageCookie()" >
- <form method="GET" action="bncontrol.htm" name="PageSelect" id="PageSelect" onsubmit="return PageSelect_onsubmit()" target="main">
- <div align="center">
-
- <table border="1" cellspacing="0" width="80">
- <script type="text/javascript" language="JavaScript"><!--
- MakeIndex();
- MakeChapTable();
- MakeCopyright();
- MakeFSize();
- MakeFontList();
- //--></script>
- </table>
- <script type="text/javascript" language="JavaScript"><!--
- MakeRotator();
- //--></script>
- </div>
- </form>
- </body>
- </html>
-